-
Notifications
You must be signed in to change notification settings - Fork 80
Firmware Over-The-Air (OTA) update capability #118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ff01fa0
to
4c280bc
Compare
This comment has been minimized.
This comment has been minimized.
3267bd4
to
3e9e7ea
Compare
f926e46
to
cfb5a09
Compare
…son object containing the base64 encoded binary because otherwise the URL becomes to long for curl to process
…' in all uppercase letters
…age type is enabled
… inter-chunk delay
…in ArduinoIoTCloud_Defines.h
…without being allocated on the heap with 'new'
…eds to be enabled by the user by configuring OTA_STORAGE_MKRMEM
Memory usage change @50927c87408a280bbddc6108a3e1156d81142fbc
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR intends to provide firmware OTA capability via Arduino IoT Cloud and
MKR MEM
shield connected to eitherMR 1000
,MR WiFi 1010
,MR NB 1500
orMR GSM 1400
. The following modifications need to be made to the sketch:Furthermore the desired OTA storage type needs to be configured in
ArduinoIoTCloud_Config.h
, e.g.The firmware sets the hidden
int
propertyOTA_STORAGE_TYPE
to one of the following values which allows the cloud to determine which OTA update storage medium is available:OTA_STORAGE_TYPE
= -1 -> No OTA storage medium connected, OTA not possibleOTA_STORAGE_TYPE
= 0 -> MKR MEM Shield connected, OTA possibleIf the OTA update file has been downloaded and its checksum verified successfully then a reset is performed and the new firmware is flashed onto the MCU by the second stage
SFU
bootloader. In case of an error during the update process no reset is performed and the source of the error is written to the hiddenint
propertyOTA_ERROR
. The following error codes are available:OTA_ERROR
= 0 -> No ErrorOTA_ERROR
= 1 -> OTA storage initialisation failedOTA_ERROR
= 2 -> OTA storage open failedOTA_ERROR
= 3 -> OTA storage write failedOTA_ERROR
= 4 -> Checksum mismatchOTA_ERROR
= 5 -> Received data overrun (too much data received before it could be processed)